home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / lanmodm1.zip / LASER.BAT < prev    next >
DOS Batch File  |  1990-04-02  |  3KB  |  59 lines

  1. REM LASER.BAT Sample Batch file to use with serial printers, plotters, etc.
  2. REM The next command should be run on the computer which will run the
  3. REM printer, and the port number and driver name are examples only.
  4. REM MCOM 1 COMM10
  5. REM
  6. REM The remaining commands are run on the computer which is sending output
  7. REM or receiving input from the shared device.
  8. REM
  9. REM This command installs the INT14 interface program NETDEV.COM.
  10. NETDEV
  11. REM
  12. REM This command tells NETDEV to start its search at device COMM10.
  13. REM The name should be changed if MCOM is set up with a different name.
  14. NETDEV /START=10
  15. REM
  16. REM This command opens the connection between the computer wishing to share
  17. REM the device and the computer connected to the device.
  18. NETDEV /OPEN
  19. REM
  20. REM This command uses the DOS MODE program to set the bit speed and other
  21. REM serial parameters before the program using the shared device is started.
  22. MODE COM1:9600,N,8,1
  23. REM The P option may need to be used if the device uses handshaking. It causes
  24. REM a busy condition to be retried. Otherwise DOS will give a 'Write Error'
  25. REM message.
  26. REM MODE COM1:9600,N,8,1,P
  27. REM
  28. REM This command causes any parallel port data to be sent to the NETDEV program
  29. REM and hence the shared serial device. It is not needed if your program
  30. REM is always set up to print to the serial port COM1:
  31. MODE LPT1:=COM1:
  32. REM
  33. REM Here you would insert the command to run the program which is to use the
  34. REM shared device. Optionally you can break this batch file in half here and
  35. REM call the first part 'SHAREOPN' or something similar, and the second part
  36. REM 'SHARECLS' to denote Shared Open and Shared Close batch files. Normally
  37. REM this file will be edited by you for your needs and given a descriptive
  38. REM name based upon its intended use. You can also print directly from DOS
  39. REM using redirection or with the PRINT command.
  40. REM
  41. REM When use of the device is no longer needed, the connection should be
  42. REM closed. Anytime MODE is used to redirect the printer port it is recom-
  43. REM mended that the following command be used to cancel the redirection.
  44. MODE LPT1:
  45. REM
  46. REM Anytime MODE is used to wait for retries (by setting serial parameters
  47. REM and specifying the P option) it is recommended that the following
  48. REM command be used to cancel retry operation.
  49. MODE COM1:9600,N,8,1
  50. REM
  51. REM This command closes the connection between the computer sharing the device
  52. REM and the device itself. It should be used when the current user is finished
  53. REM with the shared device so that others can use it.
  54. REM NETDEV /CLOSE
  55. REM
  56. REM Since NETDEV will install to a computer once only, this batch file can be
  57. REM repeatedly executed when using a shared device with a program.
  58.  
  59.